package com.gopay.common.domain.cust;
// Generated 2016-8-11 14:53:08 by Hibernate Tools 4.3.1.Final

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

import com.gopay.common.domain.BaseEntity;

/**
 * Entity: 短信认证表
 */
@Entity
@Table(name = "CUST_SMS_AC")
public class CustSmsAc extends BaseEntity {

    /**
	 * 
	 */
	private static final long serialVersionUID = -7963079428126067378L;

	/** 
     * 短信认证id
     */
    private Long smsAcId;

    /** 
     * 客户UserID  跟userinfo表相关联
     */
    private String userId;

    /** 
     * 客户cust_id
     */
    private String custId;

    /** 
     * 当日密码错误次数 累加等于5短信认证锁定
     */
    private int todaySmsErrNum;

    /** 
     * 短信锁定状态   (输密码错误5次锁定状态，0-正常,1-锁定)
     */
    private String smsAcLockStat;

    /** 
     * 解锁日期
     */
    private Date lastUnbundlingTime;
    
    /**
     * 锁定日期
     */
    private Date lockSmsAcTime;

    /** 
     * 创建时间
     */
    private Date createTs;

    /** 
     * 更新时间
     */
    private Date lastUpdTs;

    /** 
     * 备注
     */
    private String remark;

    /** 
     * 备注2 解锁来源  console  、定时器
     */
    private String remark2;

    /** 
     * 备注--预留3
     */
    private String remark3;

    /** 
     * 乐观锁版本号
     */
    private Long version;

    public CustSmsAc() {
    }

    @Id
    @SequenceGenerator(name = "CustSmsAcSequence", sequenceName = "CUST_SMS_AC_SEQ")
    @GeneratedValue(generator = "CustSmsAcSequence", strategy = GenerationType.SEQUENCE)
    @Column(name = "SMS_AC_ID", unique = true, nullable = false, precision = 22, scale = 0)
    public Long getSmsAcId() {
        return this.smsAcId;
    }

    public void setSmsAcId(Long smsAcId) {
        this.smsAcId = smsAcId;
    }

    @Column(name = "USER_ID", nullable = false, length = 10, unique=true)
    public String getUserId() {
        return this.userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Column(name = "CUST_ID", nullable = false, length = 10)
    public String getCustId() {
        return this.custId;
    }

    public void setCustId(String custId) {
        this.custId = custId;
    }

    @Column(name = "TODAY_SMS_ERR_NUM")
    public int getTodaySmsErrNum() {
        return this.todaySmsErrNum;
    }

    public void setTodaySmsErrNum(int todaySmsErrNum) {
        this.todaySmsErrNum = todaySmsErrNum;
    }

    @Column(name = "SMS_AC_LOCK_STAT", length = 2)
    public String getSmsAcLockStat() {
        return this.smsAcLockStat;
    }

    public void setSmsAcLockStat(String smsAcLockStat) {
        this.smsAcLockStat = smsAcLockStat;
    }

    @Column(name = "LAST_UNBUNDLING_TIME")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastUnbundlingTime() {
        return this.lastUnbundlingTime;
    }

    public void setLastUnbundlingTime(Date lastUnbundlingTime) {
        this.lastUnbundlingTime = lastUnbundlingTime;
    }

    @Column(name = "CREATE_TS", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreateTs() {
        return this.createTs;
    }

    public void setCreateTs(Date createTs) {
        this.createTs = createTs;
    }

    @Column(name = "LAST_UPD_TS")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastUpdTs() {
        return this.lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

    @Column(name = "REMARK", length = 50)
    public String getRemark() {
        return this.remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Column(name = "REMARK2", length = 50)
    public String getRemark2() {
        return this.remark2;
    }

    public void setRemark2(String remark2) {
        this.remark2 = remark2;
    }

    @Column(name = "REMARK3", length = 50)
    public String getRemark3() {
        return this.remark3;
    }

    public void setRemark3(String remark3) {
        this.remark3 = remark3;
    }

    @Column(name = "LOCK_SMS_AC_TIME")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLockSmsAcTime() {
        return lockSmsAcTime;
    }

    public void setLockSmsAcTime(Date lockSmsAcTime) {
        this.lockSmsAcTime = lockSmsAcTime;
    }

    @Version
    @Column(name = "VERSION", precision = 22, scale = 0)
    public Long getVersion() {
        return this.version;
    }

    public void setVersion(Long version) {
        this.version = version;
    }

}
